import request from "@/utils/request";
import axios from "axios";

// 获取阿里云的临时文件夹上传token
export function getUploadItemMediaToken() {
  return request({
    url: "/file/item_medias/token",
    method: "post"
  });
}
// 上传图片到阿里云oss
export function uploadFileToAliOss(url, data) {
  return axios({
    method: "post",
    data: data,
    url: url,
    headers: {
      "Content-Type": "multipart/form-data"
    },
    timeout: 20000
  });
}
